package com.sikhyeon.datastructure.model;

public class TreeNode {
    private int value;
    private TreeNode left, right;
    private boolean leftThread, rightThread;
    private double x, y; // 위치 정보를 저장할 필드

    public TreeNode(int value) {
        this.value = value;
        this.left = null;
        this.right = null;
        this.leftThread = true;
        this.rightThread = true;
    }

    public int getValue() {
        return value;
    }

    public TreeNode getLeft() {
        return left;
    }

    public void setLeft(TreeNode left) {
        this.left = left;
    }

    public TreeNode getRight() {
        return right;
    }

    public void setRight(TreeNode right) {
        this.right = right;
    }

    public boolean isLeftThread() {
        return leftThread;
    }

    public void setLeftThread(boolean leftThread) {
        this.leftThread = leftThread;
    }

    public boolean isRightThread() {
        return rightThread;
    }

    public void setRightThread(boolean rightThread) {
        this.rightThread = rightThread;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }
}
